package com.gss.module.translate.constants;

/**
 * @author DYang
 * @date 2023/6/6
 * 翻译种类
 */
public enum TransType {

    BAIDU_TRANS("baidu","百度翻译"),
    BING_TRANS("bing","微软翻译"),
    GOOGLE_TRANS("google","谷歌翻译"),
    YOUDAO_TRANS("youdao","有道翻译"),
    ;

    public final String TRANS;
    public final String DESC;

    TransType(String TRANS, String DESC) {
        this.TRANS = TRANS;
        this.DESC = DESC;
    }

    public static TransType getTransType(String trans){
        TransType[] values = values();
        for (TransType value : values) {
            if (trans.equals(value.TRANS)) {
                return value;
            }
        }
        return null;
    }
}
